home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / TP021692.ARJ / 02-16-92.TPC
Text File  |  1992-02-16  |  53KB  |  1,566 lines

  1.  
  2. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3.  
  4. Conference 4
  5. Date       02-12-92 03:05:10
  6. From       Trevor Carlsen
  7. To         Janjaap Streefkerk
  8. Subject    Re: PRINTER UTILITIES
  9.  
  10.  TCID:a09490b5 574a
  11.  JS> Thanks for answering my question concerning Printer Utilities for
  12.  JS> Pascal 6.0. I'm surprised about your answer, because I'm in fact using
  13.  
  14.  JS> the Professional Package ( including TurboDebugger (great!), TASM etc.
  15.  
  16.  JS> )).
  17.  JS> But I didn't find any Objects included, concerning Printer Support.
  18. My
  19.  JS> version is about a year old, so maybe it was added to the Professional
  20.  
  21.  JS> Package later. Could you be more specific about the Object-names you
  22.  
  23.  JS> were referring to ? ( if you're right, I'll undoubtedly order an
  24.  JS> update from Broland ).
  25.  
  26. I no longer have the message I wrote that you refer to and as you have not
  27. quoted me I cannot remember exactly what I said.  However I would not have
  28. been referring to the Turbo Pascal Professional package.  I was referring
  29. to "Object Professional"
  30.  by Turbo Power.
  31.  
  32. TeeCee
  33.  
  34.  * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  35. --- Dogfight 2.05 #2
  36.  
  37. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  38.  
  39. Conference 4
  40. Date       02-12-92 03:29:30
  41. From       Trevor Carlsen
  42. To         Abdu Bukres
  43. Subject    quote
  44.  
  45.  TCID:e8a7f2db 574b
  46.  AB> How can I use the ' character inside a string. A string is
  47.  AB> delimited by two 's and an extra ' anywhere gives an error!
  48.  
  49. Just use an extra '...
  50.  
  51. var
  52.   st : string;
  53.  
  54. begin
  55.   st := 'I don''t want to do that';
  56.   writeln(st);
  57. end.
  58.  
  59. Another way is ...
  60.  
  61.   st := 'I don'#39't want to do that';
  62.  
  63. TeeCee
  64.  
  65.  
  66.  
  67.  
  68.  * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  69. --- Dogfight 2.05 #2
  70.  
  71. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  72.  
  73. Conference 4
  74. Date       02-11-92 18:59:30
  75. From       Mark Ouellet
  76. To         Tom Przeor
  77. Subject    Re: Power G Programming.
  78.  
  79.     On 05 Feb 92, you, Tom Przeor, of 3:640/820.0 wrote...
  80.  MO>> DL> Power Graphics Programming
  81.  MO>> DL> Michael Abrash
  82.  MO>> DL> Que
  83.  MO>> DL> 0-88022-500-9
  84.  MO>>This is probably more like it, I heard someone mention it's
  85.  MO>>been out of publication for a year but might have been
  86.  TP> You can order the book from PC Techniqes - phone 602 483 0193.
  87.  TP>
  88.  MO>>redited for TP 6.0. Anyways I'll keep an eye open for this
  89.  TP> Judging by M. Abrash's writing in DDJ and PC Techniques I wouldn't
  90.  TP> count on Pascal version - likely to get 85% asm and 15% C code.
  91. Thanks for the info Tom,
  92.         I guess the TP 6.0 book might be by someone else, in
  93. any case I allways try to get a look inside before buying. I
  94. hate getting a magazine at 5.95 and finding out there is
  95. nothing of interrest to me inside so you can guess what's my
  96. reaction when it's a $40 book.
  97.         Best regards,
  98.         Mark Ouellet.
  99.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  100. --- Dogfight 2.05 #2
  101.  
  102. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  103.  
  104. Conference 4
  105. Date       02-11-92 19:02:20
  106. From       Mark Ouellet
  107. To         Jan Feijes
  108. Subject    Re: Segment:Offset Conversion
  109.  
  110.     On 28 Jan 92, you, Jan Feijes, of 2:281/506.50 wrote...
  111.  MO>> Actually Jan,
  112.  MO>> his formula IS correct, THAT'S 10 as in HEX or 16 decimal,
  113.  MO>> thus giving:
  114.  JF> Well yes Hex to dec conversion is hard doing when you are out of
  115.  JF> coffee...
  116. I understand Jan,
  117.         Perfectly..., At over 30 cups a day myself, you
  118. wouldn't want to be around me when we're out of coffee ;-)
  119.         Best regards,
  120.         Mark Ouellet.
  121.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  122. --- Dogfight 2.05 #2
  123.  
  124. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  125.  
  126. Conference 4
  127. Date       02-11-92 19:04:20
  128. From       Mark Ouellet
  129. To         Jan Feijes
  130. Subject    Re: Processing Hz
  131.  
  132.     On 30 Jan 92, you, Jan Feijes, of 2:281/506.50 wrote...
  133.  JF> You should sample with 2*20KHz*2*2 for good CD quality sound:
  134.  JF> 2 channels
  135.  JF> 20Khz (max bandwidth an ear can hear (15K will be OK too)
  136.  JF> 2 Shannons sampling theorem
  137.  JF> 2 bytes /sample
  138.  JF> -+--- *
  139.  JF> A very high rate
  140.  JF>
  141.  JF> It is allways a compromise and computers are rather slow for sound
  142.  JF> stuff. They should have a proper sound processor like the sparc (sun)
  143.  
  144.  JF> does.
  145.         Well the 486-33 is keeping up very well at that rate
  146. but you are right, 15k would even be enough, 44khz will be
  147. nice for some sampling on special applications since the
  148. card has an input level range from 10mV to 5V and so does
  149. the Output.
  150.  JF> Then you can have nice stuff like voice mail (something like
  151.  JF> e-mail, but then better) so I could actually hear you speak.
  152.         I know what you mean, Computer Language had an
  153. article on Voice Mail-Boxes, one of the archives of CLC
  154. (Comp. Lang. CODE) has an example of an application but I
  155. would still need the answering system to go with that.
  156.  JF> But still
  157.  JF> with this thing the sound is limited to mono and about 6Khz of bandwidth
  158.  
  159.  JF> (12Khz sampling rate / 8 bits I believe).
  160.  JF> I have several (60 or so) megs of music on the hard disk just to play
  161.  
  162.  JF> when you are working on the machine to run in the background (separate
  163.  
  164.  JF> processor, so who cares).
  165.         Interresting, what format .MID? .MOD? The SP-Jr that
  166. comes with it can load MIDI, ROL and it's own format of song
  167. files.
  168.  JF> But still my CD player at home is better (and cheaper).
  169.  JF> Computers are not ready for digitized sound. After the introduction
  170. of
  171.  JF> the DCC this may change for hardware sound compression stuff is
  172.  JF> develloped which is the thing the PC would need to store music and to
  173.  
  174.  JF> process it in a decent manner. (Compression ratio's of over 10 can be
  175.  
  176.  JF> achieved, without the ear hearing any differences on the contrary, the
  177.  
  178.  JF> DCC compression can reproduce it better due to the compression technique
  179.  
  180.  JF> compared to a CD, Dynamic range of DCC close to 120dB is reached, CD
  181. =
  182.  JF> 96.3295862dB (using ideal interfacing electronics)).
  183.         Yes the Sound Blaster had a max compression ration
  184. of 2:1 I think, this one can go as high as 4:1 but it's
  185. still producing huge files of course. Thank god I have
  186. Stacker to compress those a bit more.
  187. So far most of the soft I grabbed for the SB and Adlib run
  188. on this one wihtout a problem, Hell even the old Ultra-Force
  189. demos refused to recognize the SB when I had it and
  190. recongized this one instantly as an SB ;-)
  191.         Best regards,
  192.         Mark Ouellet.
  193.  * Origin: One beer gets me drunk..., the 47th ;-) (Fidonet 1:240/1.4)
  194. --- Dogfight 2.05 #2
  195.  
  196. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  197.  
  198. Conference 4
  199. Date       02-11-92 19:16:20
  200. From       Mark Ouellet
  201. To         Darren Lyon
  202. Subject    Re: VGA book
  203.  
  204.     On 05 Feb 92, you, Darren Lyon, of 3:690/660.4 wrote...
  205.  DL> Okay, spoke before thinking... The book annoys me more than it bores
  206.  
  207.  DL> me,
  208.  DL> because of the fact that there is the ray-tracing section, and the
  209.  DL> complete
  210.  DL> code to the tracer, but very little discussion of the intrinsics of
  211.  DL> ray-tracing itself.
  212.  DL>
  213.  DL> This appears to be the majow flaw of this book, but it does have a
  214.  DL> lot of
  215.  DL> code in it. After I re-write it and convert it to Assebly and make it
  216.  
  217.  DL> run in
  218.  DL> a tweaked mode, I'll let you know how useful it is :-)
  219. Darren,
  220.         How about a tweaked mode like 800x600x32768 color
  221. mode on the ATI VGAWONDER XL <big grin>
  222.         I can even offer to beta test it <Even bigger grin>
  223.         Well from your description, as I said, from your
  224. point of view it's boring, from mine it sounds very
  225. interresting. There must be other sections than the
  226. Ray-Tracing and even that one is interresting. And the other
  227. sections must be more elaborate.
  228.         Best regards,
  229.         Mark Ouellet.
  230.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  231. --- Dogfight 2.05 #2
  232.  
  233. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  234.  
  235. Conference 4
  236. Date       02-11-92 19:20:30
  237. From       Mark Ouellet
  238. To         Daniel Prosser
  239. Subject    Re: QUESTION
  240.  
  241.     On 04 Feb 92, you, Daniel Prosser, of 3:690/660.9 wrote...
  242.  >> Daniel,
  243.  >>         Take a closer look at your example and at his,
  244.  >> you'll quickly notice that yours will not move the cursor on
  245.  >> the remote computer, as via modem, which is what he is doing
  246.  >> ;-)
  247.  DP> Really? I didn't see him write that in his message or I would never
  248.  DP> have replied... plus... I doubt delline which he was using would
  249.  DP> send anything to the remote computer...  :)
  250. Daniel,
  251.         You are right, my apologies. I assumed from the
  252. code, that it was some kind of BBS routine, something like
  253. the Screen-length-pause message on so many BBSes. I hadn't
  254. noticed the Delline in there.
  255.         Best regards,
  256.         Mark Ouellet.
  257.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  258. --- Dogfight 2.05 #2
  259.  
  260. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  261.  
  262. Conference 4
  263. Date       02-11-92 19:22:50
  264. From       Mark Ouellet
  265. To         Richard Nelson
  266. Subject    Re: No reply...
  267.  
  268.     On 07 Feb 92, you, Richard Nelson, of 1:216/117.3012 wrote...
  269.  RN> I understand the frustration, being a frequent software user myself.
  270.  
  271.  RN> :-) As I think I indicated in a message yesterday, Borland is looking
  272. at
  273.  RN> ways of making bug lists available without making it too costly or
  274.  RN> burdensome. I don't know what they'll come up with, but the consensus
  275.  
  276.  RN> seems to be that bug lists of some sort will be made available in some
  277.  
  278.  RN> form.
  279. Great Richard,
  280.         As I said, Compuserve was a good idea to try and
  281. make it available but not every one can afford it.
  282. I know I'm a real pain in the b... sometimes..., well most
  283. of the time ;-)
  284. BTW, I can't wait to see the Seminar that's comming to town
  285. in march about OOP. Dbase IV 1.5 was a great news, sure hope
  286. you guys have finally come up with the compiler Ashton-Tate
  287. had been promising us for so long.
  288.         I must admit though, that, eventhough I like Borland
  289. so much, I still hate Ashton-Tate and what I'm really
  290. looking for is the Paradox 4.0 demo. I had a hard time
  291. getting Pascal 6.0 in the office but Paradox would really
  292. solve lots of our problems. I'll have to see what goodies
  293. you guys have in store for us on both of these (Dbase IV 1.5
  294. and Paradox 4.0). Maybe you'll manage to make me like Dbase,
  295. if borland can't no-one can ;-)
  296.         Also French versions of Pascal, Quattro PRO 4.0,
  297. PARADOX 4.0, Dbase IV 1.5 will be showed. It's about time,
  298. my friend has been trying to get a french version for some
  299. time now.
  300. Since Dbase IV 1.5 was not announced anywhere else I also
  301. hope to see an announcement for TP 7.0 ;-)
  302.         Best regards,
  303.         Mark Ouellet.
  304.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  305. --- Dogfight 2.05 #2
  306.  
  307. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  308.  
  309. Conference 4
  310. Date       02-11-92 19:32:00
  311. From       Mark Ouellet
  312. To         Richard Nelson
  313. Subject    Re: Stand alone Turbo Help
  314.  
  315.     On 07 Feb 92, you, Richard Nelson, of 1:216/117.3012 wrote...
  316.  >>         maybe you have something there, a TSR
  317.  >> TV unit, well
  318.  >> at least an exemple of what one might look like.
  319.  RN> I don't have anything right here.  I've never made a TSR, but I'm told
  320.  
  321.  RN> that people have done it, using Turbo Power's TSRs Made Easy, I think.
  322.  
  323.  RN> If Terry Hughes is around, he might be able to validate that.
  324. Richard,
  325.         What I meant was 'You might have an IDEA there'. You
  326. mentionned re-doing Thelp in TVision, so as long as you're
  327. doing it why not make it available to Pascal Users as a Unit
  328. maybe.
  329. Oh and While we're back on my whish list, Which must be
  330. getting pretty big by now <grin>, maybe you have noticed
  331. what people have been complaining most with programming TSRs
  332. and Shells.... Heap management. Could you suggest to the
  333. programming team that, being able to increment or decrement
  334. the heap space of a program during run-time would be nice. I
  335. know this one is a toughy but it would be great.
  336.         Best regards,
  337.         Mark Ouellet.
  338.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  339. --- Dogfight 2.05 #2
  340.  
  341. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  342.  
  343. Conference 4
  344. Date       02-11-92 19:40:20
  345. From       Mark Ouellet
  346. To         Greg Smith
  347. Subject    Re: Execswap
  348.  
  349.     On 08 Feb 92, you, Greg Smith, of 1:104/630.0 wrote...
  350.  MO>>        This is really strange, any chance of having a look
  351.  MO>> at the code???
  352.  GS> You've got it.  The demo program which came with SpawnO wouldn't run.
  353.  I
  354.  GS> also tested it on my com program, and it behaved exactly like the demo.
  355. Ok then, I'm pretty sure I tested it with the demo program
  356. but I'll unarchive it again just to make sure.
  357.  GS> I tried every combination possible...
  358. Have you tried removing TSRs in case one of them was causing
  359. it??
  360.  MO>> I tried it on a couple of systems so far:
  361. Well it seems strange it would lock up on such different
  362. systems. Unless they have something in common, something you
  363. load on every computer you use.
  364.  MO>>        BTW have you gotten any info on swapping with it but
  365.  MO>> keeping ISR's resident during the swap. It seems TP put's
  366.  MO>> any ISR defined in units at the end of the program in
  367.  MO>> memory, making it impossible to swap without them.
  368.  GS> Have fun with that one.. I haven't had a need to do that.
  369. Well Greg,
  370.         thanks anyways, I don't beleive it will be possible
  371. without lots of tweaking since TP seems to load all units at
  372. the end of the code segment.
  373.         Best regards,
  374.         Mark Ouellet.
  375.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  376. --- Dogfight 2.05 #2
  377.  
  378. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  379.  
  380. Conference 4
  381. Date       02-11-92 19:50:40
  382. From       Mark Ouellet
  383. To         David G. Edwards
  384. Subject    Re: [not] free bug fixes
  385.  
  386.     On 02 Feb 92, you, David G. Edwards, of 1:370/60.5 wrote...
  387.  DG> I think *Borland* should maintain a public list of all known bugs. 
  388. It
  389.  DG> should not be up to DJ alone to keep the users of Turbo Pascal "in the
  390.  
  391.  DG> know".
  392.  DG>
  393.  DG> If Borland doesn't want to admit any bugs, they should use DJ as a
  394.  DG> "cover" and supply him with a complete list of the bugs, so he can keep
  395.  
  396.  DG> us informed without bruising their marketing plans.  :-)
  397. David,
  398.         Take a look at Richard Nelson's reply to my message
  399. to him, concerning this problem. It's a few messages back...
  400. or was that forward ;-)
  401.         Best regards,
  402.         Mark Ouellet.
  403.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  404. --- Dogfight 2.05 #2
  405.  
  406. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  407.  
  408. Conference 4
  409. Date       02-11-92 20:08:00
  410. From       Mark Ouellet
  411. To         Mike Davis
  412. Subject    Re: Accessing the SB
  413.  
  414.     On 03 Feb 92, you, Mike Davis, of 1:114/33.0 wrote...
  415.  MD> PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!! post those source codes
  416.  MD> please!!!!!!!!!!!!!!!!!!!! Excuse my exictment but I WOULD LOVE TO HAVE
  417.  MD> THOSE!
  418.  MD>
  419.  MD> Modform.arj and the SB material also
  420. Mike,
  421. I second your request, I to would like to see them
  422.         Best regards,
  423.         Mark Ouellet.
  424.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  425. --- Dogfight 2.05 #2
  426.  
  427. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  428.  
  429. Conference 4
  430. Date       02-11-92 22:13:40
  431. From       Mark Ouellet
  432. To         Eugene Mok
  433. Subject    Re: Latest version of TP 6
  434.  
  435.     On 31 Jan 92, you, Eugene Mok, of 3:633/160.0 wrote...
  436.  EM> What's the latest version of TP 6? I've just purchased a copy a week
  437. ago
  438.  EM> and the files were dated 23/10/90 time 6.00. As I understand it, there
  439.  
  440.  EM> has been a maintainance update. 6.01? I have not sent in my registration
  441.  
  442.  EM> card yet. Did Borland sent out updates or did you have to request for
  443.  
  444.  EM> them?
  445.  EM>
  446.  EM> What were the bug fixes?
  447. Eugene,
  448.         If you didn't buy from Borland directly you probaby
  449. got a copy that had been sitting on the shelf for some time.
  450.         Note that buying direct from Borland costs more
  451. since they must garanty their distributors a fair price.
  452. Let's face it, if it was cheaper directly from Borland who
  453. would buy elsewhere. But for the price difference you are
  454. sure to get the Latest version !!!
  455.         Best regards,
  456.         Mark Ouellet.
  457.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  458. --- Dogfight 2.05 #2
  459.  
  460. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  461.  
  462. Conference 4
  463. Date       02-11-92 22:23:50
  464. From       Mark Ouellet
  465. To         Ken Burrows
  466. Subject    Re: Pkunzip to nul
  467.  
  468.     On 05 Feb 92, you, Ken Burrows, of 1:249/201.21 wrote...
  469.  KB> In a message to Kelly <04 Feb 92 01:18> Mike Davis wrote:
  470.  KB>
  471.  MD>> That didn't seem to work
  472.  MD>> EXEC(GETENV('COMSPEC'),' pkunzip test.zip *.* >NUL');
  473.  KB> Try this :
  474.  KB> swapvectors;
  475.  KB> exec(getenv('COMSPEC'),
  476.  KB> '/C'+ fexpand(fsearch('PKUNZIP.EXE',getenv('PATH')))+
  477.  KB> ' test.zip >NUL');
  478.  KB> swapvectors;
  479.  KB>
  480.  KB> if pkunzip is in the root, or on the path, fsearch will return it, and
  481.  
  482.  KB> fexpand will expand it to its full path and filename. Exec will execute
  483.  
  484.  KB> it with the parameters supplied. You need the '/C' as the first part
  485. of
  486.  KB> the second parameter.
  487.  KB>
  488.  KB> p.s  I tested it and it worked for me!
  489. Ken,
  490.         Test it again without the fexpand and it will still
  491. work, if fexpand can find Pkunzip by looking at the PATH
  492. then so can command.com don't you think???
  493.         Best regards,
  494.         Mark Ouellet.
  495.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  496. --- Dogfight 2.05 #2
  497.  
  498. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  499.  
  500. Conference 4
  501. Date       02-11-92 23:11:40
  502. From       Mark Ouellet
  503. To         Mike Weaver
  504. Subject    Re: Animation And Dig Sound W/ Sb Or Sb 
  505.  
  506.     On 04 Feb 92, you, Mike Weaver, of 1:104/631.0 wrote...
  507.  MW> Well, you seem to be an expert! Lets see how to do it!  I just
  508.  MW> saw the
  509.  MW> demo for 'Vector Graphics' by Ultra Force and think its kinda dumb that
  510.  
  511.  MW> they  don't realse the source for this if there not going to use it
  512. for
  513.  MW> anything  other then demos!
  514. Mike,
  515.         You can say that again..., saw their announcement
  516. about some of them releasing a book...unfortunately they
  517. haven't realized it's VIDEO books we need most, SB
  518. programming is nice but units and libraries are allready
  519. available.
  520.         Best regards,
  521.         Mark Ouellet.
  522.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  523. --- Dogfight 2.05 #2
  524.  
  525. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  526.  
  527. Conference 4
  528. Date       02-12-92 17:58:50
  529. From       Mark Ouellet
  530. To         Richard Nelson
  531. Subject    Re: TPVision Patch
  532.  
  533.  Richard,
  534.         One of these days you're really going to hate me ;-)
  535. Here goes nothing,
  536.         Since you participated to the writing of TP 6.0's
  537. manuals and, since so many people are complaining about the
  538. lack of GOOD, TV dedicated, books... How about rolling out
  539. your own Richard ????
  540.         Best regards,
  541.         Mark Ouellet.
  542.  * Origin: BaseBall for Windows, use the disks as bases ;-) (Fidonet 1:240/1.4)
  543. --- Dogfight 2.05 #2
  544.  
  545. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  546.  
  547. Conference 4
  548. Date       02-12-92 15:28:00
  549. From       Trevor Carlsen
  550. To         Brian Stark
  551. Subject    Creating a text editor.
  552.  
  553.  TCID:788399ac 574f
  554.  BS> Does anyone have any suggestions as to how I can go about creating a
  555.  
  556.  BS> text editor in TP v5.5?
  557.  
  558. Borland used to market an editor toolbox that was complete with source. 
  559. It also contained a working word processor of sorts.  Even though this line
  560. has been discontinued for some time - it was originally for TP3 and then
  561. "upgraded" for TP4
  562.  - it was reasonable value.  You may be able to find a cheap copy of this
  563. somewhere as some software houses still advertise them.
  564.  
  565. As an alternative Object Professional contains an editor object.  Although
  566. I have not used it, the specs in the documentation would appear to indicate
  567. that this could be what you want.  In fact a direct quote from the documentation- "...,
  568.  the TextEditor provides a host of new editing commands, and the result is
  569. a plug-and-play editor comparable in power to the Turbo Pascal editor."
  570.  
  571. TeeCee
  572.  
  573.  * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  574. --- Dogfight 2.05 #2
  575.  
  576. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  577.  
  578. Conference 4
  579. Date       02-12-92 15:42:00
  580. From       Trevor Carlsen
  581. To         Juang Jei
  582. Subject    Error
  583.  
  584.  TCID:2272a56e 5750
  585.  JJ>         Pascal How to do ERROR CONTROL Like Basic ON ERROR GOTO .....
  586.  JJ>         because Pascal how wrong will termainted..so have error
  587.  JJ> control
  588.  JJ>         loop can control programing...So Help me...Thanks
  589.  
  590. There is no direct equivalent in Pascal.  The programmer should do all error
  591. handling.  If you are using Turbo Pascal there is an ExitProc variable which
  592. can be pointed to an exit procedure to allow proper housekeeping before program
  593. termination.
  594.   Read up the manual on ExitProc.
  595.  
  596. Another possible thing that can be done is to hook the critical error interrupt
  597. and write code to allow recovery there.  However there are some errors that
  598. it is not possible to recover from.
  599.  
  600. TeeCee
  601.  
  602.  * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  603. --- Dogfight 2.05 #2
  604.  
  605. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  606.  
  607. Conference 4
  608. Date       02-12-92 15:46:10
  609. From       Trevor Carlsen
  610. To         Ken Koch
  611. Subject    Compressing data
  612.  
  613.  TCID:ccd15ea8 5751
  614.  KK>        I am working on a label program. Currently my data files are
  615.  
  616.  KK> huge. Each data file can hold up to 1000 labels of 5 lines of 56
  617.  KK> characters of data & roughly 512 bytes of graphic data.
  618.  
  619. Does this mean that your graphical data is different for every label?
  620.  
  621. TeeCee
  622.  
  623.  * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  624. --- Dogfight 2.05 #2
  625.  
  626. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  627.  
  628. Conference 4
  629. Date       02-13-92 02:08:10
  630. From       Trevor Carlsen
  631. To         Derek Westcott
  632. Subject    Variables > 64K
  633.  
  634.  TCID:2f2fbd78 5787
  635.  DW> However, the global variables CANNOT exceed 64K...Is there a way I can
  636.  
  637.  DW> define this Buf variable to be 65592 bytes, and still keep the rest
  638. of
  639.  DW> my variables global?  I really don't want to have to define things
  640.  DW> local to certain procedures...
  641.  DW> -----
  642.  DW> The only way to do this effectively would be to do this:
  643.  DW>
  644.  DW> Var
  645.  DW>   Buf : Pointer;
  646.  DW>
  647.  DW> Begin
  648.  DW>   GetMem(Buf, 65592);
  649.  DW> .....
  650.  DW>   FreeMem(Buf, 65592);
  651.  DW> End.
  652.  
  653. This would not even compile.  No single structure may exceed 64K (in practice
  654. it is a few bytes less than that). 
  655.  
  656. TeeCee
  657.  
  658.  * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  659. --- Dogfight 2.05 #2
  660.  
  661. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  662.  
  663. Conference 4
  664. Date       02-13-92 16:02:30
  665. From       Trevor Carlsen
  666. To         Kelly Small
  667. Subject    Dialing out...
  668.  
  669.  TCID:b290dc42 578a
  670. KS> The problem here is the way in which you handle the string, you
  671. KS> can't stuff characters into the string without also updating
  672. KS> the length byte which is the [0] location of the string.  You
  673. KS> would be better to just append characters to the string with
  674. KS> something like:
  675. KS> Str := '';
  676. KS> repeat
  677. KS>   getkey(ch);
  678. KS>   str := str + ch;
  679. KS> until (not char_avail) or (str[0] = 255);
  680.  
  681. Anything that involves multiple string concatenation (as you suggest above)
  682. is usually unacceptably slow.  Better is -
  683.  
  684.   var
  685.     st   : string;
  686.     len  : byte absolute st;
  687.  
  688.   len := 0;
  689.   repeat
  690.     inc(len);
  691.     getkey(st[len]);
  692.   until (not char_avail) or (len = 255);
  693.  
  694. TeeCee
  695.  
  696.  
  697. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  698.  
  699.  
  700. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  701.  
  702. Conference 4
  703. Date       02-13-92 16:13:20
  704. From       Trevor Carlsen
  705. To         John Gohde
  706. Subject    Re: Alsp
  707.  
  708.  TCID:bbb161e1 578b
  709. > Gary I'd appreciate it if you moved this to a local echo.  My
  710. > reasons etc... are in a netmail message...
  711.  
  712. JG> There was one feature of ALSP that I particularly liked. And that does
  713.  
  714. JG> not currently exist on PASCAL. And, that is a NetWork of Beta testers.
  715.  
  716. JG> Any possibility of registering a Network of Beta Testers on PASCAL?
  717.  
  718. I spent a little time discussing (voice) ALSP and the Pascal echo with Gary
  719. McNickle the other evening. I too like the concept but feel that the echo
  720. is not the place for discussions on it.  I suggest you contact Gary by netmail
  721. and discuss
  722. it with him through that method.
  723.  
  724. I'm not  going to declare ALSP off-topic YET.  However it has the potential
  725. to tie up bandwidth in an unnecessary way and I have asked Gary to limit
  726. his messages to a simple announcement which includes a request for all future
  727. discussions to
  728. be by netmail.  If he (or anybody else) wishes to start an echo dedicated
  729. to ALSP that may be the best way for you to go.
  730.  
  731. Trevor Carlsen
  732. Mderator.
  733.  
  734. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  735.  
  736.  
  737. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  738.  
  739. Conference 4
  740. Date       02-13-92 16:31:30
  741. From       Trevor Carlsen
  742. To         Terry Hughes
  743. Subject    Simultaneous serial I/O o
  744.  
  745.  TCID:192f92e8 578c
  746. TH> I don't know how many machines you've tested that theory on but
  747. TH> I think if you test on a wide enough sample of machines you'll
  748. TH> find that it won't work reliably. The PC bus hardware was not
  749. TH> designed to share interrupts. When two boards attempt to control
  750. TH> one IRQ the IRQ line will be the average of the two controlling
  751. TH> states (i.e., when one is forcing it active and the other is
  752. TH> forcing it non-active). It's hit-or-miss whether the PIC will
  753. TH> actually see that as an interrupt -- in some
  754. TH> machines/configurations it will, in others it won't.
  755.  
  756. TH> The IBM PS/2 architecture was designed to share interrupts and
  757. TH> your suggested polling scheme will work quite reliably there.
  758. TH> Also, there are some PC serial port boards that will allow you
  759. TH> to share an IRQ so long as both UARTs sharing the IRQ are on
  760. TH> *that* board.
  761.  
  762. As you probably read, I posted a couple of messages that, whilst not directly
  763. contradicting the above, could certainly appear that way.
  764.  
  765. To date I have always used third party stuff when doing any comms work and
  766. the chap who sub-contracted some of that was the person I turned to for guidancein my replies. I showed the above reply of yours to him and he agrees 100%
  767. with your
  768. statement.  In fact he indicated that he had meant to qualify it that way
  769. but had not realised I was possibly asking about, not just dual ports, but
  770. dual cards.
  771.  
  772. TH> Our Async Professional communications library includes the
  773. TH> necessary logic for sharing IRQs but we turn it off by default
  774. TH> simply because the majority of machines out there don't have the
  775. TH> hardware for reliably sharing an IRQ.
  776.  
  777. Good speaking to you the other night...Hope the package lives up to all reports.
  778. TeeCee
  779.  
  780. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  781.  
  782.  
  783. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  784.  
  785. Conference 4
  786. Date       02-11-92 20:47:50
  787. From       Wilbert Van.leijen
  788. To         Gerald Gutierrez
  789. Subject    Graphics
  790.  
  791.  Hi Gerald,
  792. > Well.. I wouldn't quite say the 'slowest'... there're always methods of
  793. > making seemingly fast routines go very VERY slow ;) BUT if you want
  794. > something of half decent speed....... here is something for ya:
  795. Ho hum...
  796. > Procedure ASMPutPixel ( X, Y: Integer; Color: byte );
  797. > assembler;
  798. > asm
  799. >      MOV AX,0A000h
  800. >      MOV ES,AX
  801. >      MOV AX,140h
  802. >      MUL y
  803. >      ADD AX,x
  804. >      MOV DI,AX
  805. >      MOV AL,color
  806. >      MOV ES:[DI],AL
  807. > end;
  808. This is an almost *proverbial* example of wasting time & effort using assembly
  809. language to 'optimize' a routine.  Take a look at the code again.  The algorithmyou used is: Mem[$A000:y*320+x] := Color.  That's OK, it yields the correct
  810. result,
  811. but VERY slowly, due to the "MUL y" instruction.
  812. You should be able to rewrite this WITHOUT using a MUL (or IMUL) instruction!
  813. I give you a clue:  offset := y*320+x ==>
  814.                    offset := y*(256+64)+x
  815. Another clue:       y*256 = y shl 8, and
  816.                    y*64 = y shl 6 = (y shl 8) shr 2
  817. Yet another clue:   in a 16-bit word, in some cases you can multiply a value
  818.                    by 256 by swapping the lower byte with the upper byte
  819. -- No pun intended! --
  820. Regards,
  821. Wilbert
  822. * Origin: Point Wilbert | Verboden Fietsen te plaatsen (2:500/12.10956)
  823.  
  824.  
  825. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  826.  
  827. Conference 4
  828. Date       02-11-92 21:17:20
  829. From       Wilbert Van.leijen
  830. To         Mike Davis
  831. Subject    help!
  832.  
  833.  Ah, somebody's yelling 'help'- that's always an eye-catcher in this echo...
  834. > SwapVectors;
  835. > Exec('Pkunzip.exe ','test.zip *.* >NUL');
  836. > Swapvectors;
  837. >
  838. > that doesn't seem to work, just aborts pkzip running, sometimes it
  839. > works.  I just want to prevent it from writing to the screen, so i don't
  840. > have to remove the damn ansi again, takes up too much space (I don't
  841. > like programs over 10K when I program in pascal)
  842. 10K of what?  Source code of the main module?  Executable size?  Footprint
  843. in conventional memory?
  844. If it is the latter and if you're an assembler programmer, then you must
  845. be a Guru...
  846. But 'nuff kidding, here's the solution:
  847. uses Dos;
  848. {$M 4096, 0, 0 }
  849. Procedure MoveFileHandle(old, new : Word); Assembler;
  850. ASM
  851.        MOV    AH, 46h
  852.        MOV    BX, old
  853.        MOV    CX, new
  854.        INT    21h           { duplicate file handle }
  855.        MOV    AH, 3Eh
  856.        INT    21h           { close old handle }
  857. end;  { MoveFileHandle }
  858. Const
  859.  StdOut = 1;
  860.  StdErr = 2;
  861. { Ben Baker's QSORT is an example of a program that writes to StdErr.
  862.  Output written to the StdErr device cannot be redirected; but if you
  863.  duplicate the file handle to StdOut, and subsequently close it, nothing
  864.  will appear on screen.
  865.  This technique obviously does not work for programs that write to the
  866.  video display buffer directly.  }
  867. Begin
  868.  SwapVectors;
  869.  MoveFileHandle(StdErr, StdOut);
  870.  Exec(GetEnv('COMSPEC'), '/c QSORT.EXE notthere >Nul');
  871.  SwapVectors;                  { ^should display Copr. & error message }
  872. end.
  873. Regards,
  874. Wilbert
  875. * Origin: Point Wilbert | Verboden Fietsen te plaatsen (2:500/12.10956)
  876.  
  877.  
  878. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  879.  
  880. Conference 4
  881. Date       02-11-92 21:55:10
  882. From       Wilbert Van.leijen
  883. To         Peter Garcin
  884. Subject    strange things
  885.  
  886.  > Its a global unit variable. And it still seems not to work. I'm really
  887. > quite puzzled. Also, is there a VGA unit out there with routines already
  888. > in it? If so, is there a filename for downloading?
  889. VGACOL20.ZIP, 27k, free for D/L at 2:500/123 or 2:500/31 (V32/V32bis).
  890. This implements a resident text-mode palette editor; the VGA stuff is in
  891. a unit aptly named 'VGABIOS.PAS'.  Warning: a lot of the routines have been
  892. written using the BASM of TP 6.0 - any version prior to 6.0, simply will
  893. not compile.
  894. Regards,
  895. Wilbert
  896. * Origin: Point Wilbert | Verboden Fietsen te plaatsen (2:500/12.10956)
  897.  
  898.  
  899. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  900.  
  901. Conference 4
  902. Date       02-14-92 15:29:20
  903. From       Trevor Carlsen
  904. To         Ken Burrows
  905. Subject    Changing Bits...
  906.  
  907.  TCID:72c350f7 57ec
  908. KB> Function BitOn(BiteToSet,BitToSet:byte):byte;
  909. KB>    begin
  910. KB>      BitOn := BiteToSet or BitToSet;
  911. KB>    end;
  912. KB>
  913. KB> Function BitOff(BiteToClear,BitToClear:byte):byte;
  914. KB>    begin
  915. KB>      BitOff := BiteToClear and not BitToClear;
  916. KB>    end;
  917. KB>
  918. KB>
  919. KB> Check boolean truth tables to see the results of boolean equations.
  920. KB> If you don't understand them, you probably won't be able to understand
  921.  
  922. KB> why these functions work;
  923.  
  924. If BitToSet and BitToClear are passed as the bit number (0..7) then those
  925. functions as written will not work.  Here's the correction -
  926.  
  927.   BitOn  := BiteToSet or (1 shl BitToSet);
  928.   BitOff := BiteToClear and not (1 shl BitToClear);
  929.  
  930. However you may have been describing them in terms of BitToSet/BitToClear
  931. being from a table of powers of two, in which case I apologise in advance.
  932. I don't like that method as its readability is not as good as others I have
  933. posted but it
  934. is the fastest available.  It also unnecessarily uses up data space.
  935.  
  936. TeeCee
  937.  
  938. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  939.  
  940.  
  941. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  942.  
  943. Conference 4
  944. Date       02-14-92 15:33:00
  945. From       Trevor Carlsen
  946. To         Joy Mukherjee
  947. Subject    Microsoft Real to IEEE conversion
  948.  
  949.  TCID:5785bf40 57f1
  950. JM> I haven't yet figured out how to read the IDX files, and can't find
  951. JM> anybody to post how to change the MSBIN to IEEE in pascal...
  952.  
  953. type
  954.  MSSingle = array[0..3] of byte;
  955.  
  956. function MStoIEEE(MS :MSSingle) :real;
  957.  { Converts a 4 byte Microsoft format single precision real variable as
  958.   }
  959.  { used in earlier versions of QuickBASIC and GW-BASIC to IEEE 6 byte real
  960. }
  961.  var
  962.    r      : real;
  963.    ieee   : array[0..5] of byte absolute r;
  964.  begin
  965.    FillChar(r,sizeof(r),0);
  966.    ieee[0] := MS[3];
  967.    ieee[3] := MS[0];
  968.    ieee[4] := MS[1];
  969.    ieee[5] := MS[2];
  970.  MStoIEEE  := r;
  971. end;  { MStoIEEE }
  972.  
  973. You should remember that not all QuickBASIC reals are in Microsoft format.
  974. Later versions had a compiler switch to determine this if my memory serves
  975. me correctly.
  976.  
  977. TeeCee
  978.  
  979.  
  980. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  981.  
  982.  
  983. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  984.  
  985. Conference 4
  986. Date       02-14-92 15:32:40
  987. From       Trevor Carlsen
  988. To         Gary Elfert
  989. Subject    Copying Command
  990.  
  991.  TCID:bb9db46a 57f2
  992. GE> Hi.. I need help with a File Copying Command.  I tried using EXEC, but
  993. GE> that shows the file(s) being copied.  Does anyone have a command that
  994. GE> would not show the file being copied?
  995.  
  996. Here is a file copying function. I have included some supporting functions.
  997.  
  998. function Byte2Hex(numb : byte): string;       { Converts byte to hex string
  999. }
  1000.  const
  1001.    HexChars : array[0..15] of char = '0123456789ABCDEF';
  1002.  begin
  1003.    Byte2Hex[0] := #2;
  1004.    Byte2Hex[1] := HexChars[numb shr  4];
  1005.    Byte2Hex[2] := HexChars[numb and 15];
  1006.  end; { Byte2Hex }
  1007.  
  1008. function Numb2Hex(numb: word): string;       { Converts word to hex string.}
  1009.  begin
  1010.    Numb2Hex := Byte2Hex(hi(numb))+Byte2Hex(lo(numb));
  1011.  end; { Numb2Hex }
  1012.  
  1013. function Long2Hex(L: longint): string;     { Converts longint to hex string
  1014. }
  1015.  begin
  1016.    Long2Hex := Numb2Hex(L) + Numb2Hex(L shr 16);
  1017.  end; { Long2Hex }
  1018.  
  1019. function UniqueFile : string;
  1020.  
  1021. { Returns a unique file name based on the system time variable located at
  1022.  }
  1023. { $40:$6c.  This means that for two files to have similar names when created}
  1024. { by this method, they would have to be created within the same clock tick,
  1025. }
  1026. { which occurs approx. 18.2 times per second.
  1027.   }
  1028.  var
  1029.    time  : longint absolute $40:$6c;
  1030.    ftime : longint;
  1031.    year,
  1032.    month,
  1033.    day,
  1034.    junk  : word;
  1035.  begin
  1036.    ftime := time;
  1037.    GetDate(year,month,day,junk);
  1038.    ftime := ftime or (longint(year - 1991) shl 30);
  1039.    ftime := ftime or (longint(month) shl 26);
  1040.    ftime := ftime or (longint(day) shl 21);
  1041.    UniqueFile := Long2Hex(ftime) + 'BAK';
  1042.  end;  { UniqueFile }
  1043.  
  1044. function CopyFile(var file1,file2: string): boolean;
  1045.  { Copies file1 to file2 after checking if file2 exists already.  If
  1046. }
  1047.  { exists it is renamed by giving it a name that is unique with a BAK
  1048. }
  1049.  { extension.  The name portion is simply derived from the tick location}
  1050.  const
  1051.    BufferSize    = 65520;
  1052.  type
  1053.    buff_type     = array[0..pred(BufferSize)] of byte;
  1054.    buff_ptr      = ^buff_type;
  1055.  var
  1056.    f1,f2        : file;
  1057.    buffer       : buff_ptr;
  1058.    name         : string[11];
  1059.    BytesRead    : word;
  1060.    successful   : boolean;
  1061.  begin
  1062.    successful := false;                                { assume failure
  1063. }
  1064.    if MaxAvail > BufferSize then begin
  1065.      new(buffer);             { Create space on the heap for the buffer
  1066. }
  1067.      assign(f1,file1);
  1068.      {$I- turns of I/O error checking }
  1069.      assign(f2,file2);
  1070.      rename(f2,UniqueFile);               { if file name already exists
  1071. }
  1072.      if IOResult <> 0 then
  1073.        assign(f2,file2);
  1074.      rewrite(f2,1); reset(f1,1);
  1075.      if IOResult = 0 then begin             { it is Ok to start CopyFileing
  1076. }
  1077.        writeln('Copying ',file1,' to ',File2);
  1078.        repeat
  1079.          BlockRead(f1,buffer^,BufferSize,BytesRead);
  1080.          BlockWrite(f2,buffer^,BytesRead);
  1081.          successful := IOResult = 0;
  1082.        until not successful or eof(f1);
  1083.      end
  1084.      else begin
  1085.        close(f1); close(f2);                             { just in case
  1086. }
  1087.        if IOResult <> 0 then
  1088.          successful := false;
  1089.      end; { else }
  1090.      dispose(buffer);      { reclaim the heap memory we have been using
  1091. }
  1092.    end; { if MaxAvail }
  1093.    if not successful then
  1094.      writeln('Error occurred during copy process');
  1095.    CopyFile := successful;
  1096.  end; { CopyFile }
  1097.  
  1098. Requires the dos unit.
  1099.  
  1100. TeeCee
  1101.  
  1102. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1103.  
  1104.  
  1105. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1106.  
  1107. Conference 4
  1108. Date       02-14-92 18:51:50
  1109. From       Trevor Carlsen
  1110. To         Geoff Watts
  1111. Subject    Your origin line
  1112.  
  1113.  TCID:99041631 57f5
  1114. GW>  * Origin: Uses crt,dos,2 cups flour, 1 tbs Margarine, 2 lbs lard;
  1115. GW> (3:690/660.7)
  1116.  
  1117. Please alter your origin line to comply with FidoNet requirements.  (No origin
  1118. line may exceed 79 characters).
  1119.  
  1120. TeeCee
  1121.  
  1122. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1123.  
  1124.  
  1125. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1126.  
  1127. Conference 4
  1128. Date       02-14-92 19:01:30
  1129. From       Trevor Carlsen
  1130. To         James Calvert
  1131. Subject    ISAM TO READABLE ?
  1132.  
  1133.  TCID:cf144eb9 57f6
  1134. JC> Got a problem. I am part of a software team that developed medical
  1135. JC> software in Micro Focus Cobol/2. The files that the software creates
  1136.  
  1137. JC> are standard ISAM files. I am wanting to add to the medical software
  1138.  
  1139. JC> package but I want to write the code in TP6.0. I am looking for a way
  1140.  
  1141. JC> or a library that enables me to DIRECTLY read/write to the ISAM files
  1142.  
  1143. JC> (on the fly). It can't be a method using some proprietary conversion
  1144.  
  1145. JC> package, because the ISAM files will need to stay unmodified.
  1146.  
  1147. To my knowledge there is no such thing as "standard ISAM" files.  However
  1148. as a member of the team that developed the software, surely you would have
  1149. no difficulty obtaining the format of these particular files?  If they were
  1150. created by some
  1151. commercial library package they may be proprietry and you would need to
  1152. get the details of their format in order to read/write to them.
  1153.  
  1154. TeeCee
  1155.  
  1156.  
  1157.  
  1158. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1159.  
  1160.  
  1161. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1162.  
  1163. Conference 4
  1164. Date       02-14-92 19:20:10
  1165. From       Trevor Carlsen
  1166. To         Fred Burgess
  1167. Subject    Reading and writing to LASTREAD
  1168.  
  1169.  TCID:552c8064 57f7
  1170. FB> We got it to read the lastread file (for FIDO *.MSG) but we can't get
  1171.  
  1172. FB> it to update it properly.  I feel that we did something wrong with the
  1173.  
  1174. FB> Reading of the file.  Anybody have any ideas on how to do both??  I
  1175.  
  1176. FB> want to see how far off we are in getting it to do what it's supposed
  1177.  
  1178. FB> to do.
  1179.  
  1180. Without seeing an example of what you are doing, it is close to impossible
  1181. to help with any authority.  However one thing you should do, check that
  1182. you are resetting the file after reading it before writing to it.  (I make
  1183. the assumption it
  1184. just has a single record.)
  1185.  
  1186. TeeCee
  1187.  
  1188. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1189.  
  1190.  
  1191. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1192.  
  1193. Conference 4
  1194. Date       02-14-92 19:26:20
  1195. From       Trevor Carlsen
  1196. To         Chris Whitney
  1197. Subject    Storing Unlimited Record
  1198.  
  1199.  TCID:a307ac26 57f8
  1200. CW> Hello, I'm trying to make an online game, but I have a
  1201. CW> problem with disk space- the same problem many bbs's have
  1202. CW> with their message bases. If I store all the parts of my
  1203. CW> game (192), I get about 95% slack! (Directory entries take
  1204. CW> up more space then the files!)  So I need to store all my
  1205. CW> records in one file...with one variable being unlimited in
  1206. CW> length, still being able to get to the next variable!
  1207. CW> Something like this:
  1208.  
  1209. CW> PlayerList:Record
  1210. CW>             Name:String[30];
  1211. CW>             Age:byte;
  1212. CW>             ..etc..or whatever...
  1213. CW>             Items:???     {This can be one item, none, or many}
  1214. CW>            end;
  1215.  
  1216. CW> But then have a list of items that doesn't have a minimum or
  1217. CW> maximim.. I can do this with an array, but that takes tonnes
  1218. CW> of disk space.. plus for the thing I'm doing it's possible
  1219. CW> to have 20,000 items or none! So what to do?  I was thinking
  1220. CW> about pointers, but am not sure how they work entirely and
  1221. CW> I'd have trouble writing it...Items:Array[0..0]???
  1222.  
  1223. I would advise you to create two files - one with fixed length data and one
  1224. with text data.  The fixed length file would contain a field with a longint
  1225. that gives the file offset of the first text data in the other file that
  1226. pertains to that
  1227. record.  This can be in the form of a linked list if you need to add to
  1228. or delete it.  You could get really smart and allocate this space in predeterminsize chunks and determine what chunks are available by means of a bitmap.
  1229.  
  1230. TeeCee
  1231.  
  1232. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1233.  
  1234.  
  1235. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1236.  
  1237. Conference 4
  1238. Date       02-14-92 19:32:10
  1239. From       Trevor Carlsen
  1240. To         Jeff Mitchell
  1241. Subject    Fido Msg structure
  1242.  
  1243.  TCID:6ac788f0 57f9
  1244. JM>  How many systems still use "Opus" format bases, of .MSG
  1245. JM> files? I had thought that most systems have switched to
  1246. JM> Hudson or some proprietary storage system....MSG is so
  1247. JM> wasteful of drivespace. ...
  1248.  
  1249. I agree.  But there are still plenty of systems using Opus formats.
  1250.  
  1251. TeeCee
  1252.  
  1253. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1254.  
  1255.  
  1256. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1257.  
  1258. Conference 4
  1259. Date       02-14-92 19:34:00
  1260. From       Trevor Carlsen
  1261. To         Brandon Jones
  1262. Subject    Fossil Programming
  1263.  
  1264.  TCID:c35189b2 57fa
  1265. BJ>   Hello.. Just wondering what the problem could be here. I am using
  1266. a
  1267. BJ> fossil to do some communication modem routines. I am able to send the
  1268. BJ> characters to the remote system fine. But whenever I get a character
  1269. BJ> back, I always get some garbage character over and over ( Changes for
  1270. BJ> each connect, but doesn't change while the connection lasts ). So if
  1271. BJ> they type in 'Hello' it will write to me '[[[[[' or something. It does
  1272. BJ> it simultaniously as the key is being pressed. So I get the character,
  1273. BJ> just doesn't want to give me the right one. I have used BNU, X00, and
  1274. BJ> different connect speeds so it isn't that...
  1275.  
  1276. I would suggest that somewhere you have a logic error of somekind and are
  1277. reading a different variable than you think you are.  Maybe you are doing
  1278. something like using a value parameter in a procedure when it should be a
  1279. reference parameter.
  1280.  Without you showing us the actual procedure you are using we can only guess.
  1281.  
  1282. TeeCee
  1283.  
  1284. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1285.  
  1286.  
  1287. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1288.  
  1289. Conference 4
  1290. Date       02-14-92 19:40:20
  1291. From       Trevor Carlsen
  1292. To         Nathan Wambach
  1293. Subject    Stuff
  1294.  
  1295.  TCID:f2bca8f1 57fb
  1296. NW> Hi!  Does anyone out there know how to figure a persentag in pascal??
  1297.  
  1298. NW> I'm trying to add 7% to a inputed variable... I cant figure it out...
  1299.  
  1300.  
  1301. To add percentage to value:
  1302.  
  1303.  value := (value * percentage / 100) + value;
  1304.  
  1305. TeeCee
  1306.  
  1307. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1308.  
  1309.  
  1310. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1311.  
  1312. Conference 4
  1313. Date       02-14-92 19:44:10
  1314. From       Trevor Carlsen
  1315. To         Jud Mccranie
  1316. Subject    returning EMS
  1317.  
  1318.  TCID:60f6f8ae 57fc
  1319. JM> In TP 5.5 (and probably other versions), when a program
  1320. JM> under devlopment uses EMS bombs out without releasing or
  1321. JM> disposing of it, it often seems to stay allocated.  Is there
  1322. JM> any way to recover EMS that was grabbed by a program that
  1323. JM> bombed out other than rebooting?
  1324.  
  1325. In any situation where there is a need for clean-up if a program crashes
  1326. unexpectedly, it is important to have set up an exit procedure to do the
  1327. necessary housekeeping.  This is especially important for applications that
  1328. hook interrupts as
  1329. failure to do so can be disastrous.  There are plenty of other things that
  1330. can be important for exit procedures also, releasing allocated memory, closing
  1331. opened files etc.
  1332.  
  1333. I can't imagine you don't do this already and if so, I can offer little other
  1334. help.  But just in case -
  1335.  
  1336.  var
  1337.    OldExitProc: pointer;
  1338.  
  1339.  procedure ReleaseEMS; far;  { Important that the procedure be declared
  1340. far }
  1341.    begin
  1342.      ExitProc := OldExitProc;
  1343.      Do_your_cleanup_here;
  1344.    end;
  1345.  
  1346.  procedure Initialise; { Make this the first procedure your program calls
  1347. }
  1348.    begin
  1349.      OldExitProc := ExitProc;
  1350.      ExitProc    := @ReleaseEMS;
  1351.    end;
  1352.  
  1353. TeeCee
  1354.  
  1355.  
  1356. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1357.  
  1358.  
  1359. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1360.  
  1361. Conference 4
  1362. Date       02-14-92 20:03:30
  1363. From       Trevor Carlsen
  1364. To         Frederic Roland
  1365. Subject    Idea for the PASCAL ECHO
  1366.  
  1367.  TCID:e25fa21f 57f4
  1368. FR> Why not post a list of good books on Turbo Pascal Programming once a
  1369.  
  1370. FR> month ?
  1371.  
  1372. Good idea.  Will include this in the A2FAPQ file coming soon.
  1373.  
  1374. TeeCee
  1375.  
  1376.  
  1377. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1378.  
  1379.  
  1380. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1381.  
  1382. Conference 4
  1383. Date       02-14-92 20:06:40
  1384. From       Trevor Carlsen
  1385. To         jeroen pluimers
  1386. Subject    Days in month
  1387.  
  1388.  TCID:d059802a 57f3
  1389. TC> The algorithm appears to me to be correct for the years 1901..2099
  1390.  
  1391. jp> It does not work with all Gregorian dates (for instance in 1900 it
  1392. jp> goes wrong)
  1393.  
  1394. Of course... and I specifically EXcluded 1900 and 2100 for that reason.
  1395. In business type programs it is silly to worry about dates outside that range
  1396. anyway.
  1397.  
  1398. TeeCee
  1399.  
  1400. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1401.  
  1402.  
  1403. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1404.  
  1405. Conference 4
  1406. Date       02-14-92 04:46:50
  1407. From       Trevor Carlsen
  1408. To         Joy Mukherjee
  1409. Subject    Microsoft Real to IEEE conversion
  1410.  
  1411.  TCID:57857846 57ed
  1412. JM> I haven't yet figured out how to read the IDX files, and can't find
  1413. JM> anybody to post how to change the MSBIN to IEEE in pascal...
  1414.  
  1415. type
  1416.  MSSingle = array[0..3] of byte;
  1417.  
  1418. function MStoIEEE(MS :MSSingle) :real;
  1419.  { Converts a 4 byte Microsoft format single precision real variable as
  1420.   }
  1421.  { used in earlier versions of QuickBASIC and GW-BASIC to IEEE 6 byte real
  1422. }
  1423.  var
  1424.    r      : real;
  1425.    ieee   : array[0..5] of byte absolute r;
  1426.  begin
  1427.    FillChar(r,sizeof(r),0);
  1428.    ieee[0] := MS[3];
  1429.    ieee[3] := MS[0];
  1430.    ieee[4] := MS[1];
  1431.    ieee[5] := MS[2];
  1432.  MStoIEEE  := r;
  1433. end;  { MStoIEEE }
  1434.  
  1435. You should remember that not all QuickBASIC reals are in Microsoft format.
  1436. Later versions had a compiler switch to determine this if my memory serves
  1437. me correctly.
  1438.  
  1439. TeeCee
  1440.  
  1441.  
  1442. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1443.  
  1444.  
  1445. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1446.  
  1447. Conference 4
  1448. Date       02-14-92 05:32:30
  1449. From       Trevor Carlsen
  1450. To         Gary Elfert
  1451. Subject    Copying Command
  1452.  
  1453.  TCID:bb9d356c 57ee
  1454. GE> Hi.. I need help with a File Copying Command.  I tried using EXEC, but
  1455. GE> that shows the file(s) being copied.  Does anyone have a command that
  1456. GE> would not show the file being copied?
  1457.  
  1458. Here is a file copying function. I have included some supporting functions.
  1459.  
  1460. function Byte2Hex(numb : byte): string;       { Converts byte to hex string
  1461. }
  1462.  const
  1463.    HexChars : array[0..15] of char = '0123456789ABCDEF';
  1464.  begin
  1465.    Byte2Hex[0] := #2;
  1466.    Byte2Hex[1] := HexChars[numb shr  4];
  1467.    Byte2Hex[2] := HexChars[numb and 15];
  1468.  end; { Byte2Hex }
  1469.  
  1470. function Numb2Hex(numb: word): string;       { Converts word to hex string.}
  1471.  begin
  1472.    Numb2Hex := Byte2Hex(hi(numb))+Byte2Hex(lo(numb));
  1473.  end; { Numb2Hex }
  1474.  
  1475. function Long2Hex(L: longint): string;     { Converts longint to hex string
  1476. }
  1477.  begin
  1478.    Long2Hex := Numb2Hex(L) + Numb2Hex(L shr 16);
  1479.  end; { Long2Hex }
  1480.  
  1481. function UniqueFile : string;
  1482.  
  1483. { Returns a unique file name based on the system time variable located at
  1484.  }
  1485. { $40:$6c.  This means that for two files to have similar names when created}
  1486. { by this method, they would have to be created within the same clock tick,
  1487. }
  1488. { which occurs approx. 18.2 times per second.
  1489.   }
  1490.  var
  1491.    time  : longint absolute $40:$6c;
  1492.    ftime : longint;
  1493.    year,
  1494.    month,
  1495.    day,
  1496.    junk  : word;
  1497.  begin
  1498.    ftime := time;
  1499.    GetDate(year,month,day,junk);
  1500.    ftime := ftime or (longint(year - 1991) shl 30);
  1501.    ftime := ftime or (longint(month) shl 26);
  1502.    ftime := ftime or (longint(day) shl 21);
  1503.    UniqueFile := Long2Hex(ftime) + 'BAK';
  1504.  end;  { UniqueFile }
  1505.  
  1506. function CopyFile(var file1,file2: string): boolean;
  1507.  { Copies file1 to file2 after checking if file2 exists already.  If
  1508. }
  1509.  { exists it is renamed by giving it a name that is unique with a BAK
  1510. }
  1511.  { extension.  The name portion is simply derived from the tick location}
  1512.  const
  1513.    BufferSize    = 65520;
  1514.  type
  1515.    buff_type     = array[0..pred(BufferSize)] of byte;
  1516.    buff_ptr      = ^buff_type;
  1517.  var
  1518.    f1,f2        : file;
  1519.    buffer       : buff_ptr;
  1520.    name         : string[11];
  1521.    BytesRead    : word;
  1522.    successful   : boolean;
  1523.  begin
  1524.    successful := false;                                { assume failure
  1525. }
  1526.    if MaxAvail > BufferSize then begin
  1527.      new(buffer);             { Create space on the heap for the buffer
  1528. }
  1529.      assign(f1,file1);
  1530.      {$I- turns of I/O error checking }
  1531.      assign(f2,file2);
  1532.      rename(f2,UniqueFile);               { if file name already exists
  1533. }
  1534.      if IOResult <> 0 then
  1535.        assign(f2,file2);
  1536.      rewrite(f2,1); reset(f1,1);
  1537.      if IOResult = 0 then begin             { it is Ok to start CopyFileing
  1538. }
  1539.        writeln('Copying ',file1,' to ',File2);
  1540.        repeat
  1541.          BlockRead(f1,buffer^,BufferSize,BytesRead);
  1542.          BlockWrite(f2,buffer^,BytesRead);
  1543.          successful := IOResult = 0;
  1544.        until not successful or eof(f1);
  1545.      end
  1546.      else begin
  1547.        close(f1); close(f2);                             { just in case
  1548. }
  1549.        if IOResult <> 0 then
  1550.          successful := false;
  1551.      end; { else }
  1552.      dispose(buffer);      { reclaim the heap memory we have been using
  1553. }
  1554.    end; { if MaxAvail }
  1555.    if not successful then
  1556.      writeln('Error occurred during copy process');
  1557.    CopyFile := successful;
  1558.  end; { CopyFile }
  1559.  
  1560. Requires the dos unit.
  1561.  
  1562. TeeCee
  1563.  
  1564. * Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
  1565.  
  1566.